package com.zuoye.Dey04;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;

public class Demo {
    public static void main(String[] args) throws IOException {
        ArrayList<Properties> list = new ArrayList<>();
        list.add(new Properties("品名", "Iphone11 Pro Max"));
        list.add(new Properties("颜色", "暗夜绿"));
        list.add(new Properties("存储容量", "256G"));
        list.add(new Properties("价格", "10899"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("dey11\\src\\com\\zuoye\\dey04\\test2_1.txt"));
        for (Properties p : list) {
            bw.write(p.getA()+","+p.getB());
            bw.newLine();
            bw.flush();
        }
        bw.close();
    }
}
